Integrand size = 24, antiderivative size = 32 \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {i (a+i a \tan (c+d x))^{1+n}}{a d (1+n)} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 32} \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {i (a+i a \tan (c+d x))^{n+1}}{a d (n+1)} \]
[In]
[Out]
Rule 32
Rule 3568
Rubi steps \begin{align*} \text {integral}& = -\frac {i \text {Subst}\left (\int (a+x)^n \, dx,x,i a \tan (c+d x)\right )}{a d} \\ & = -\frac {i (a+i a \tan (c+d x))^{1+n}}{a d (1+n)} \\ \end{align*}
Time = 0.19 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00 \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {i (a+i a \tan (c+d x))^{1+n}}{a d (1+n)} \]
[In]
[Out]
Time = 0.45 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.97
method | result | size |
derivativedivides | \(-\frac {i \left (a +i a \tan \left (d x +c \right )\right )^{1+n}}{a d \left (1+n \right )}\) | \(31\) |
default | \(-\frac {i \left (a +i a \tan \left (d x +c \right )\right )^{1+n}}{a d \left (1+n \right )}\) | \(31\) |
risch | \(-\frac {2 i a^{n} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{-n} \left ({\mathrm e}^{i \left (d x +c \right )}\right )^{2 n} 2^{n} {\mathrm e}^{\frac {i \left (-\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{3} \pi n +\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) n +\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \pi \,\operatorname {csgn}\left (i {\mathrm e}^{2 i \left (d x +c \right )}\right ) n -\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (d x +c \right )}\right ) n +\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \operatorname {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \pi n -\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \operatorname {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \operatorname {csgn}\left (i a \right ) \pi n -\pi \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (d x +c \right )}\right )^{3} n +2 \pi \operatorname {csgn}\left (i {\mathrm e}^{2 i \left (d x +c \right )}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) n -\pi \,\operatorname {csgn}\left (i {\mathrm e}^{2 i \left (d x +c \right )}\right ) \operatorname {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right )^{2} n -\operatorname {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{3} \pi n +\operatorname {csgn}\left (\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \operatorname {csgn}\left (i a \right ) \pi n +4 d x +4 c \right )}{2}}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d \left (1+n \right )}\) | \(528\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (28) = 56\).
Time = 0.24 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.88 \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {2 i \, \left (\frac {2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n} e^{\left (2 i \, d x + 2 i \, c\right )}}{d n + {\left (d n + d\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + d} \]
[In]
[Out]
\[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n} \sec ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {i \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n + 1}}{a d {\left (n + 1\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (28) = 56\).
Time = 0.73 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.94 \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=-\frac {i \, \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}\right )^{n + 1}}{a d {\left (n + 1\right )}} \]
[In]
[Out]
Time = 0.51 (sec) , antiderivative size = 104, normalized size of antiderivative = 3.25 \[ \int \sec ^2(c+d x) (a+i a \tan (c+d x))^n \, dx=\frac {2\,\left (\cos \left (2\,d\,x\right )+\sin \left (2\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (2\,c\right )+\sin \left (2\,c\right )\,1{}\mathrm {i}\right )\,{\left (\frac {a\,\left (\cos \left (2\,c+2\,d\,x\right )+1+\sin \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,c+2\,d\,x\right )+1}\right )}^n}{d\,\left (n+1\right )\,\left (\cos \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}-\sin \left (2\,c+2\,d\,x\right )+1{}\mathrm {i}\right )} \]
[In]
[Out]